/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package verins.beans;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author hectdx
 */
@Embeddable
public class PaginapadronelectoralPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "numeropagina", nullable = false)
    private int numeropagina;
    @Basic(optional = false)
    @Column(name = "idpadronelectoral", nullable = false, length = 50)
    private String idpadronelectoral;

    public PaginapadronelectoralPK() {
    }

    public PaginapadronelectoralPK(int numeropagina, String idpadronelectoral) {
        this.numeropagina = numeropagina;
        this.idpadronelectoral = idpadronelectoral;
    }

    public int getNumeropagina() {
        return numeropagina;
    }

    public void setNumeropagina(int numeropagina) {
        this.numeropagina = numeropagina;
    }

    public String getIdpadronelectoral() {
        return idpadronelectoral;
    }

    public void setIdpadronelectoral(String idpadronelectoral) {
        this.idpadronelectoral = idpadronelectoral;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) numeropagina;
        hash += (idpadronelectoral != null ? idpadronelectoral.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PaginapadronelectoralPK)) {
            return false;
        }
        PaginapadronelectoralPK other = (PaginapadronelectoralPK) object;
        if (this.numeropagina != other.numeropagina) {
            return false;
        }
        if ((this.idpadronelectoral == null && other.idpadronelectoral != null) || (this.idpadronelectoral != null && !this.idpadronelectoral.equals(other.idpadronelectoral))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "verins.beans.PaginapadronelectoralPK[ numeropagina=" + numeropagina + ", idpadronelectoral=" + idpadronelectoral + " ]";
    }
    
}
